package team.seekers.hula.message.message.entity.dao;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import team.seekers.hula.common.entity.enums.MessageTypeEnum;
import team.seekers.hula.common.entity.enums.NoticeTypeEnum;

/**
 * <p>
 * 消息通知表
 * </p>
 *
 * @author hbc
 * @since 2021-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Message对象", description="消息通知表")
@TableName(value = "message")
public class MessageDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "消息发出者，如果系统消息则为管理员id")
    private String fromId;

    @ApiModelProperty(value = "消息接收者id")
    private String toId;

    @ApiModelProperty(value = "相关数据的id")
    private String linkId;

    @ApiModelProperty(value = "问题的id")
    private String questionId;

    private String description;

//    @ApiModelProperty(value = "消息类型")
//    @JsonValue
//    private NoticeTypeEnum type;

    @ApiModelProperty(value = "私信类型")
    @JsonValue
    private MessageTypeEnum type;

    @ApiModelProperty(value = "私信所属隧道的id")
    private String tunnelId;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    private Integer isDeleted;

    @ApiModelProperty(value = "为1则为已读")
    private Integer isReaded;


}
